package com.yc.multiple.controller;


import com.yc.multiple.bean.order.Order;
import com.yc.multiple.bean.paycenter.Paycenter;
import com.yc.multiple.service.OrderService;
import com.yc.multiple.service.PaycenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("yc")
public class ExampleController {

    @Autowired
    private OrderService orderService;

    @Autowired
    private PaycenterService paycenterService;

    @GetMapping("/order/all")
    public List<Order> listOrder(){
        return orderService.listOrder();
    }

    @GetMapping("/paycenter/all")
    public List<Paycenter> listPaycenter(){
        return paycenterService.listPaycenter();
    }

}
